@extends('admin.master')

@section('top')
<div class="top-breadcrumb pull-left">{!! Breadcrumbs::render() !!}</div>
@endsection

@section('content')
<div class="section-search mb10">
{!! Form::model($where, ['method'=>'get', 'class'=>'form-inline']) !!}
	<div class="form-group">
		{!! Form::text('word', null, ['class'=>'form-control len', 'placeholder'=>'客户名称或域名']) !!}
	</div>
	<button type="submit" class="btn btn-default">查询</button>
{!! Form::close() !!}
</div>
<div class="gridSection">
	<table class="table table-hover table-list" id="customer-list">
		<thead>
			<tr>
				<th>序号</th>
				<th>客户名称</th>
				<th>订单类型</th>
				<th>续费时间</th>
				<th>到期时间</th>
				<th>续费年限</th>
				<th>续费金额</th>
				<th>业务员</th>
				<th>合同号</th>
				<th class="text-right">操作</th>
			</tr>
		</thead>
		<tbody>
			@foreach ($data as $value)
				<tr>
					<td>{{ $i++ }}</td>
					<td>{{ $value->order->customer->name }}</td>
					<td>{{ config('system')['product'][$value->order->type][$value->order->product] }}</td>
					<td>{{ $value->created_at->format('Y-m-d') }}</td>
					<td><span class="text-warning">{{ $value->order->expired_at->format('Y-m-d') }}</span></td>
					<td>{{ $value->year }}</td>
					<td>{{ $value->amount }}</td>
					<td>{{ $value->saler->name }}</td>
					<td>{{ $value->contract_no }}</td>
					<td class="text-right">
						<div class="toolbar">
							<a href="{{ route('admin.renew.edit', $value['id']) }}" class="btn-link">修改</a>
							<span class="text-explode ">|</span>
							<a href="javascript:void(0);" data-id="{{ $value->id }}" class="btn-link delete-item">删除</a>
						</div>
					</td>
				</tr>
			@endforeach
		</tbody>
	</table>
	@if (!$data->isEmpty())
	<table class="table table-fixed table-footer">
		<tfoot>
			<tr>
				<td colspan="11">
					<div class="pagination-box">
						<div class="pull-right">
							<div class="pagination-info">共有{{ $data->total() }}条， 每页显示：20条</div>
							{!! $data->render() !!}
						</div>
					</div>				
				</td>
			</tr>
		</tfoot>
	</table>
	@else
	<div class="simple-none-data text-center">
		<i class="fa fa-exclamation-circle text-size-20 text-muted" style="vertical-align: middle"></i> 
		<span class="text-size-14 inline-block ml5">没有查询到符合条件的记录</span>
	</div>
	@endif
</div>
@endsection

@section('foot')
<script type="text/javascript">

</script>
@endsection